import yaml
from faker import Faker

faker = Faker("zh_CN")



data = {
    "name":[
        [faker.name(),faker.name(),faker.name(),faker.name()]
    ]
}
with open("./new_name.yaml", "w", encoding="utf-8") as f:
    yaml.dump(data, f,allow_unicode=True)
# data = {
#     "add":[
#         [1, 2, 3],
#         [4, 5, 6]
#     ]
# }
#
# with open("./first1.yaml", "w", encoding="utf-8") as f:
#     yaml.dump(data, f,allow_unicode=True)